.markdown-toc {
	position: fixed;
	right: 0;
	top: 40px;
	width: 250px;
	height: 100vh;
	background: #fff;
	box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
	overflow-y: auto;
	z-index: 1000;
	transition: all 0.3s ease;
}

.markdown-toc ul {
	list-style: none;
	padding-left: 15px;
}

.markdown-toc li {
	margin: 8px 0;
	cursor: pointer;
}

.markdown-toc li:hover {
	color: #4183c4;
}

.markdown-content {
	margin-right: 250px;
	max-width: calc(100% - 250px);
}

.toc-link {
	text-decoration: none;
	color: #333;
	display: block;
	padding: 3px 0;
}

.toc-link:hover {
	color: #4183c4;
}

/* 修改主题切换和展开按钮的容器样式 */
.toc-controls {
	position: sticky;
	top: 0;
	background: #fff;
	padding: 15px;
	border-bottom: 1px solid #eee;
	display: flex;
	flex-direction: column;
	gap: 10px;
	z-index: 1001;
}

/* 主题切换按钮容器 */
.theme-switch-wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	position: static;
	right: auto;
	top: auto;
	background: none;
	padding: 0;
	box-shadow: none;
}

/* 收起按钮样式 */
.toc-collapse-btn {
	width: 100%;
	height: 30px;
	border-radius: 15px;
	background: #ff4444;
	color: white;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	transition: all 0.3s ease;
}

/* 收起状态的样式 */
.markdown-toc.collapsed {
	width: 50px;
	padding: 0;
}

.markdown-toc.collapsed .toc-controls {
	padding: 5px;
}

.markdown-toc.collapsed .theme-switch-wrapper,
.markdown-toc.collapsed ul {
	display: none;
}

.markdown-toc.collapsed .toc-collapse-btn {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	margin: 5px;
}

/* 夜间模式样式 */
body.dark-mode .markdown-body {
	background-color: #1a1a1a !important;
	color: #e0e0e0 !important;
}

body.dark-mode .markdown-body h1,
body.dark-mode .markdown-body h2,
body.dark-mode .markdown-body h3,
body.dark-mode .markdown-body h4,
body.dark-mode .markdown-body h5,
body.dark-mode .markdown-body h6 {
	color: #fff !important;
}

body.dark-mode .markdown-body a {
	color: #58a6ff !important;
}

body.dark-mode .markdown-body code {
	background-color: #2d2d2d !important;
	color: #e0e0e0 !important;
}

body.dark-mode .markdown-body pre {
	background-color: #2d2d2d !important;
}

body.dark-mode .markdown-toc {
	background: #2d2d2d;
	color: #e0e0e0;
}

body.dark-mode .toc-link {
	color: #e0e0e0;
}

body.dark-mode .toc-link:hover {
	color: #58a6ff;
}
